<?php
/**
 * Categorys
 * Author : vthanh_88
 * @package WordPress
*/
get_header();
$title_cat=esc_html__('The post of ','TT');
$title_cat.=single_cat_title( '', false );
$title_cat.=esc_html__(' category','TT');
#
#Get Paged
#
if ( get_query_var('paged') ) {
	$paged = get_query_var('paged');
} elseif ( get_query_var('page') ) { 
	$paged = get_query_var('page');
} else {
	$paged = 1;
}
$posts_per_page = get_theme_option('blog','blog_post_per_page');
update_option("posts_per_page",$posts_per_page);
$sort = get_theme_option('blog','blog_sort');
$args = array(
	'post_type' => 'post',
	'posts_per_page' => $posts_per_page,
	'paged' => $paged,
	'order' => $sort, 
);
if(is_page())
{
    
	query_posts($args);
}else{
	global $wp_query;
	$query_args = array_merge( $wp_query->query, $args );
	global $posts;
	$posts=query_posts($query_args);
	}
	
?>
    <div class="wrapper">
        <?php get_sidebar(); ?>		 
        <div class="right-panel-outer">
			<div class="right-panel">
			   <div class="right-inner">
                    <h2 class="head"><?php echo 'Page of '.get_the_author();?></h2>
        	   </div>		
			   				
					<?php $author_style = get_theme_option('blog','archid_style');
					if($author_style == 'style_1'):
            			include_once('loop/loop-blog-1.php');
					elseif($author_style == 'style_2'):
     					include_once('loop/loop-blog-2.php');
					endif; ?>
    	    </div>
			<div class="content-shadow">&nbsp;</div>
        </div>
        <div class="clearfix"></div>
    </div>
<?php

get_footer();  
?>